package com.example.kt_base.s2

//TODO 34.Kotlin语言的匿名函数与具名函数
fun main() {
    //匿名函数
    showPersonInfo("derry",18){
        println(it)
    }

    //具名函数
    showPersonInfo("lian",22,::showResultImpl)

}

private fun showResultImpl(result:String){
    println(result)
}


private  inline fun showPersonInfo(name:String,age:Int,showResult:(String)->Unit){
    val str="name:$name,age:$age"
    showResult(str)
}
